iT邦幫忙

第 11 屆 iThome 鐵人賽

DAY 18
0
自我挑戰組

練習程式系列 第 18

Android,grid view、camera

  • 分享至 

  • xImage
  •  

預計接下來學習的內容:
Android Studio Tutorial - How to Show Images in Grid View | Gallery App
【Android教學】2.9 網格視圖 Grid View

Grid View應該不太需要用,用RecyclerView

整理:
一 OutOfMemoryError就是ram不夠了,可以調整android:largeHeap和android:hardwareAccelerated。
Android 使用HardwareAccelerated硬件加速总结
探究android:largeHeap

Building a Custom Camera on Android

整理:
一 客製化相機的功能有:
1 flash mode閃光
2 前鏡頭、後鏡頭
3 滑動-- > 拉遠或拉近畫面
4 畫圖
5 存檔
原本是Camera API 到 camera2再到CameraX

Camera API
https://developer.android.com/guide/topics/media/camera

android.hardware.camera2
https://developer.android.com/reference/android/hardware/camera2/package-summary.html

CameraX overview
https://developer.android.com/training/camerax

二 CameraX還不是完整版的,所以在商品階段的app不建議使用:

The CameraX library is in alpha stage, as its API surfaces aren't yet finalized. We do not recommend using Alpha libraries in production. Libraries should strictly avoid depending on Alpha libraries in production, as their API surfaces may change in source- and binary-incompatible ways.

三 CameraX會自動選最好的resolution(解析度):

CameraX automatically provides functionality that is specific to the device that your app is running on. For example, CameraX will automatically determine the best resolution to use if you don't specify a resolution, or if the resolution you specify is unsupported.

四 auto-white-balance, auto-exposure, and auto-focus (3A)是什麼?
auto-white-balance-- >自動白平衡
auto-exposure--> 自動曝光
and auto-focus--> 自動對焦

五 先照著官方的檔案,練習CameraX:
https://codelabs.developers.google.com/codelabs/camerax-getting-started/#0


上一篇
Android 拍照並顯示照片
下一篇
Git
系列文
練習程式37
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言